(function($){
	
	
	//置顶
	(function ($list, $insertWrapper, $items, $links) {
		
		var obj = {};
		
		$links.first().click(function () {
			$links.removeClass('active');
			$(this).addClass('active');
			for (var o in obj) {
				$insertWrapper.append(obj[o]);
			}
		});
		
		$('.tab-item', '#awardList').not(':first').each(function (i) {
			
			obj['c' + i] = $items.eq(i);
			
			$(this).click(function () {
				$links.removeClass('active');
				$(this).addClass('active');
				var now = obj['c' + i];
				now.prependTo($insertWrapper);
				for (var o in obj) {
					if (obj[o] !== now) {
						$insertWrapper.append(obj[o]);
					}
				}
				
			});
			
		});
		
	})($('#awardList'), $('#awardList').find('.award-list'), $('#awardList').find('.list-item'), $('.tab-item', '#awardList'));
	
})(jQuery);